<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>39 | 项目资料</title>
<meta name="viewport" content="width=device-width, initial-scale=2">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Modern Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript">
	
	 addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } 

</script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Graph CSS -->
<link href="css/lines.css" rel='stylesheet' type='text/css' />
<link href="css/font-awesome.css" rel="stylesheet">
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Nav CSS -->
<link href="css/custom.css" rel="stylesheet">
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<script src="js/custom.js"></script>
<!-- Graph JavaScript -->
<script src="js/d3.v3.js"></script>
<script src="js/rickshaw.js"></script>
<script>
	$(function() {
		$(".upload_btn").bind("click", function() {
			var file = $("#" + this.form.id + "_input");
			if(file.val() == null || file.val() == "") {
				alert("请选择文件！");
				return;
			}
			if(confirm("是否要上传这个文件？[" + file.val() + "]")) {
				if(window.FormData) {
					var formData = new FormData($("#" + this.form.id)[0]);
					formData.append("uploadType", this.form.name);
					upload(formData);
				}	
		 	}
		});
	});
		
	function upload(formData) {
		$.ajax({
			url : "/cetc39pms/upload",
			type : "POST",
			data : formData,
			cache : false,
			contentType : false,
			processData : false,
			success: function(data) {
					alert("上传成功！");
					window.location.reload();
			}
			
		});
	}
</script>
</head>
<body>
	<div id="wrapper">
		<!-- Navigation -->
		<!-- left.jsp -->
		<jsp:include page="left.jsp"></jsp:include>
		<div id="page-wrapper">
			<div class="xs">
				<div class="well1 white">
					项目组织
					<hr />
					<table class="table">
						<tr>
							<th>项目令号</th>
							<td>${project.project_code }</td>
							<th>项目名称</th>
							<td>${project.project_name }</td>
						</tr>
						<tr>
							<td>启动令</td>
							<td colspan="2"><c:choose>
									<c:when test="${fn:length(startOrderList) <= 0}">
										<span style="color:red;">暂时没有上传启动令文件</span>
									</c:when>
									<c:otherwise>
										<c:forEach items="${startOrderList }" var="start">
											<a href="download?filePath=${start }">${fn:split(start,
												"\\")[fn:length(fn:split(start, "\\")) - 1] }</a>
										</c:forEach>
									</c:otherwise>
								</c:choose></td>
							<td>
								<form name="startOrder" enctype="multipart/form-data"
									id="startOrder">
									<input class="upload_input" type="file" name="file" id="startOrder_input" /> 
									<input class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr>
						<tr>
							<td>交接单</td>
							<td colspan="2"><c:choose>
									<c:when test="${fn:length(handoverList) <= 0}">
										<span style="color:red;">暂时没有上传交接单文件</span>
									</c:when>
									<c:otherwise>
										<c:forEach items="${handoverList }" var="hand">
											<a href="download?filePath=${hand }">${fn:split(hand,
												"\\")[fn:length(fn:split(hand, "\\")) - 1] }</a>
										</c:forEach>
									</c:otherwise>
								</c:choose></td>
							<td><form name="handOver" enctype="multipart/form-data"
									id="handOver">
									<input class="upload_input" type="file" name="file" id="handOver_input"/> <input
										class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr>
						<tr>
							<td>令号通知</td>
							<td colspan="2"><c:choose>
									<c:when test="${fn:length(decreeNoticeList) <= 0}">
										<span style="color:red;">暂时没有上传令号通知文件</span>
									</c:when>
									<c:otherwise>
										<c:forEach items="${decreeNoticeList }" var="decree">
											<a href="download?filePath=${decree }">${fn:split(decree,
												"\\")[fn:length(fn:split(decree, "\\")) - 1] }</a>
										</c:forEach>
									</c:otherwise>
								</c:choose></td>
							<td><form name="decreeNotice" enctype="multipart/form-data"
									id="decreeNotice">
									<input class="upload_input" type="file" name="file" id="decreeNotice_input"/> 
									<input class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr>
						<tr>
							<td>设计师任命</td>
							<td colspan="2"><c:choose>
									<c:when test="${fn:length(designerList) <= 0}">
										<span style="color:red;">暂时没有上传设计师任命文件</span>
									</c:when>
									<c:otherwise>
										<c:forEach items="${designerList }" var="designer">
											<a href="download?filePath=${designer }">${fn:split(designer,
												"\\")[fn:length(fn:split(designer, "\\")) - 1] }</a>
										</c:forEach>
									</c:otherwise>
								</c:choose></td>
							<td><form name="designer" enctype="multipart/form-data"
									id="designer">
									<input class="upload_input" type="file" name="file" id="designer_input"/> 
									<input class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr>
						<tr>
							<td>启动会纪要</td>
							<td colspan="2"><c:choose>
									<c:when test="${fn:length(summaryList) <= 0}">
										<span style="color:red;">暂时没有上传启动会纪要文件</span>
									</c:when>
									<c:otherwise>
										<c:forEach items="${summaryList }" var="summary">
											<a href="download?filePath=${summary }">${fn:split(summary,
												"\\")[fn:length(fn:split(summary, "\\")) - 1] }</a>
										</c:forEach>
									</c:otherwise>
								</c:choose></td>
							<td>
								<form name="summary" enctype="multipart/form-data" id="summary">
									<input class="upload_input" type="file" name="file" id="summary_input"/>
									<input class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr>
						<!-- <tr>
							<td>其它</td>
							<td colspan="2">暂未设计</td>
							<td>
								<form name="other" enctype="multipart/form-data" id="other">
									<input class="upload_input" type="file" name="file" /> <input
										class="upload_btn" type="button" value="上传" />
								</form></td>
						</tr> -->
					</table>
				</div>
			</div>




			<!-- copyright -->



			<jsp:include page="copyright.jsp"></jsp:include>

		</div>
	</div>
	<!-- /#page-wrapper -->
	</div>
	<!-- /#wrapper -->
	<!-- Bootstrap Core JavaScript -->
	<script src="js/bootstrap.min.js"></script>
</body>
</html>
